home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / var / lib / dpkg / info / dhcp3-client.preinst < prev    next >
Text File  |  2008-08-25  |  2KB  |  65 lines

  1. #!/bin/sh
  2.  
  3. set -e
  4.  
  5. case "$1" in
  6.     install|upgrade)
  7.         # if the /etc/dhclient.conf from dhcp-client was modified, 
  8.     # bring it forward to /etc/dhcp3/dhclient.conf, but in a way not
  9.     # to upset dpkg about a changed conffile
  10.         if [ ! -e /etc/dhcp3/dhclient.conf ] && [ -e /etc/dhclient.conf ] && \
  11.         ! >/dev/null 2>&1 md5sum -c - <<-EOF; then
  12.         10830c7543724cfd36f10dd87a5f98eb  /etc/dhclient.conf
  13.         EOF
  14.         mkdir -p /etc/dhcp3
  15.         cp /etc/dhclient.conf /etc/dhcp3/dhclient.conf.oldconfig
  16.         fi
  17.  
  18.     # We renamed debug-enter to debug - handle the transition
  19.     if [ ! -e /etc/dhcp3/dhclient-enter-hooks.d/debug ] && \
  20.           [ -e /etc/dhcp3/dhclient-enter-hooks.d/debug-enter ]; then
  21.         mv /etc/dhcp3/dhclient-enter-hooks.d/debug-enter \
  22.            /etc/dhcp3/dhclient-enter-hooks.d/debug
  23.     else
  24.         rm -f /etc/dhcp3/dhclient-enter-hooks.d/debug-enter
  25.     fi
  26.  
  27.     # We renamed debug-exit to debug - handle the transition
  28.     if [ ! -e /etc/dhcp3/dhclient-exit-hooks.d/debug ] && \
  29.           [ -e /etc/dhcp3/dhclient-exit-hooks.d/debug-exit ]; then
  30.         mv /etc/dhcp3/dhclient-exit-hooks.d/debug-exit \
  31.            /etc/dhcp3/dhclient-exit-hooks.d/debug
  32.     else
  33.         rm -f /etc/dhcp3/dhclient-exit-hooks.d/debug-exit
  34.     fi
  35.  
  36.     # We moved /etc/dhcp3/dhclient-script to /sbin in 3.0.4-2
  37.     if dpkg --compare-versions "$2" lt-nl "3.0.4-2"; then
  38.         if [ -e /etc/dhcp3/dhclient-script ]; then
  39.             if >/dev/null 2>&1 md5sum -c - <<-EOF; then
  40.             2b18b5c59b26d00aa115716b3da2ed26  /etc/dhcp3/dhclient-script
  41.             EOF
  42.                 rm -f /etc/dhcp3/dhclient-script
  43.             fi
  44.         fi
  45.     fi
  46.         ;;
  47.  
  48.     abort-upgrade)
  49.         ;;
  50.  
  51.     *)
  52.         echo "preinst called with unknown argument \`$1'" >&2
  53.         exit 1
  54.     ;;
  55. esac
  56.  
  57. # dh_installdeb will replace this with shell code automatically
  58. # generated by other debhelper scripts.
  59.  
  60.  
  61.  
  62. exit 0
  63.  
  64.  
  65.